package marchsoft.modules.four.common.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import marchsoft.annotation.rest.AnonymousGetMapping;
import marchsoft.modules.upload.oss.OssUtils;
import marchsoft.response.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName CommonController
 * @Author ZhuGuangLiang <786945363@qq.com>
 * @Date 2022/03/30 22:12
 */
@RestController
@RequiredArgsConstructor
@Api(tags = "公共模块")
@RequestMapping("/api/common")
public class CommonController {
	private final OssUtils ossUtils;

	@AnonymousGetMapping("/uploadSign")
	@ApiOperation(value = "获取上传凭证",notes = "author:zhangsan")
	public Result<Object> getUploadSign(){
		System.out.println("我被吊用了");
		return Result.success(ossUtils.upload());
	}
}
